package com.liy.cloud.common.pw.service.impl;

import com.liy.cloud.common.pw.dao.PwDeviceStoreDao;
import com.liy.cloud.common.pw.entity.PwDeviceStoreEntity;
import com.liy.cloud.common.pw.service.PwDeviceStoreService;
import com.das.framework.common.dao.IBaseDao;
import com.das.framework.common.service.impl.BaseServiceImpl;
import com.das.framework.common.utils.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangwei
 * @date 2018/12/28 11:07:16
 * @description 设备钱箱明细实现类
 */
@Service
public class PwDeviceStoreServiceImpl extends BaseServiceImpl<PwDeviceStoreEntity, String> implements PwDeviceStoreService {

    @Autowired
    private PwDeviceStoreDao pwDeviceStoreDao;

    @Override
    public IBaseDao<PwDeviceStoreEntity, String> getDao() {
        return pwDeviceStoreDao;
    }

    @Override
    public void saveDeviceStore(List<PwDeviceStoreEntity> list) {
        if(!Tools.listIsNullOrEmpty(list)) {
            for (PwDeviceStoreEntity entity : list) {
                pwDeviceStoreDao.insertSelective(entity);
            }
        }
    }
}
